package com.huaxin.hxmoduleworkorder.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.huaxin.hxmoduleworkorder.models.MaintenanceOrder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.Map;

@Mapper
public interface MaintenanceOrderMapper extends BaseMapper<MaintenanceOrder> {
    @Select("SELECT status, COUNT(*) AS count FROM maintenance_order WHERE is_deleted = 0 GROUP BY status")
    Map<String, Long> countByStatus();
}